<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Spec::Runner::Options</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Spec::Runner::Options</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../../files/vendor/plugins/rspec/lib/spec/runner/options_rb.html">
                vendor/plugins/rspec/lib/spec/runner/options.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="../../Object.html">
                Object
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000531">add_example_group</a>&nbsp;&nbsp;
      <a href="#M000536">colour=</a>&nbsp;&nbsp;
      <a href="#M000549">custom_runner</a>&nbsp;&nbsp;
      <a href="#M000550">custom_runner?</a>&nbsp;&nbsp;
      <a href="#M000554">default_differ</a>&nbsp;&nbsp;
      <a href="#M000547">differ_class=</a>&nbsp;&nbsp;
      <a href="#M000534">examples_run?</a>&nbsp;&nbsp;
      <a href="#M000546">examples_should_be_run?</a>&nbsp;&nbsp;
      <a href="#M000535">examples_should_not_be_run</a>&nbsp;&nbsp;
      <a href="#M000545">files_to_load</a>&nbsp;&nbsp;
      <a href="#M000540">formatters</a>&nbsp;&nbsp;
      <a href="#M000551">heckle</a>&nbsp;&nbsp;
      <a href="#M000548">load_class</a>&nbsp;&nbsp;
      <a href="#M000542">load_formatters</a>&nbsp;&nbsp;
      <a href="#M000543">load_heckle_runner</a>&nbsp;&nbsp;
      <a href="#M000530">new</a>&nbsp;&nbsp;
      <a href="#M000544">number_of_examples</a>&nbsp;&nbsp;
      <a href="#M000537">parse_diff</a>&nbsp;&nbsp;
      <a href="#M000538">parse_example</a>&nbsp;&nbsp;
      <a href="#M000539">parse_format</a>&nbsp;&nbsp;
      <a href="#M000532">remove_example_group</a>&nbsp;&nbsp;
      <a href="#M000533">run_examples</a>&nbsp;&nbsp;
      <a href="#M000555">set_spec_from_line_number</a>&nbsp;&nbsp;
      <a href="#M000552">sorted_files</a>&nbsp;&nbsp;
      <a href="#M000553">sorter</a>&nbsp;&nbsp;
      <a href="#M000556">stderr?</a>&nbsp;&nbsp;
      <a href="#M000541">story_formatters</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">


    <div id="constants-list">
      <h3 class="section-bar">Constants</h3>

      <div class="name-list">
        <table summary="Constants">
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">FILE_SORTERS</td>
          <td>=</td>
          <td class="context-item-value">{         'mtime' =&gt; lambda {|file_a, file_b| File.mtime(file_b) &lt;=&gt; File.mtime(file_a)}</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">EXAMPLE_FORMATTERS</td>
          <td>=</td>
          <td class="context-item-value">{ # Load these lazily for better speed                'specdoc' =&gt; ['spec/runner/formatter/specdoc_formatter',                'Formatter::SpecdocFormatter'],                      's' =&gt; ['spec/runner/formatter/specdoc_formatter',                'Formatter::SpecdocFormatter'],                 'nested' =&gt; ['spec/runner/formatter/nested_text_formatter',          'Formatter::NestedTextFormatter'],                      'n' =&gt; ['spec/runner/formatter/nested_text_formatter',            'Formatter::NestedTextFormatter'],                   'html' =&gt; ['spec/runner/formatter/html_formatter',                   'Formatter::HtmlFormatter'],                      'h' =&gt; ['spec/runner/formatter/html_formatter',                   'Formatter::HtmlFormatter'],               'progress' =&gt; ['spec/runner/formatter/progress_bar_formatter',           'Formatter::ProgressBarFormatter'],                      'p' =&gt; ['spec/runner/formatter/progress_bar_formatter',           'Formatter::ProgressBarFormatter'],       'failing_examples' =&gt; ['spec/runner/formatter/failing_examples_formatter',       'Formatter::FailingExamplesFormatter'],                      'e' =&gt; ['spec/runner/formatter/failing_examples_formatter',       'Formatter::FailingExamplesFormatter'], 'failing_example_groups' =&gt; ['spec/runner/formatter/failing_example_groups_formatter', 'Formatter::FailingExampleGroupsFormatter'],                      'g' =&gt; ['spec/runner/formatter/failing_example_groups_formatter', 'Formatter::FailingExampleGroupsFormatter'],                'profile' =&gt; ['spec/runner/formatter/profile_formatter',                'Formatter::ProfileFormatter'],                      'o' =&gt; ['spec/runner/formatter/profile_formatter',                'Formatter::ProfileFormatter'],               'textmate' =&gt; ['spec/runner/formatter/text_mate_formatter',              'Formatter::TextMateFormatter']</td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">STORY_FORMATTERS</td>
          <td>=</td>
          <td class="context-item-value">{         'plain' =&gt; ['spec/runner/formatter/story/plain_text_formatter',   'Formatter::Story::PlainTextFormatter'],             'p' =&gt; ['spec/runner/formatter/story/plain_text_formatter',   'Formatter::Story::PlainTextFormatter'],          'html' =&gt; ['spec/runner/formatter/story/html_formatter',         'Formatter::Story::HtmlFormatter'],             'h' =&gt; ['spec/runner/formatter/story/html_formatter',         'Formatter::Story::HtmlFormatter'],      'progress' =&gt; ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter'],             'r' =&gt; ['spec/runner/formatter/story/progress_bar_formatter', 'Formatter::Story::ProgressBarFormatter']</td>
        </tr>
        </table>
      </div>
    </div>



    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">after_suite_parts</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">argv</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">backtrace_tweaker</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">before_suite_parts</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">colour</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">context_lines</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">diff_format</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">differ_class</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">dry_run</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">error_stream</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">example_groups</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">examples</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">filename_pattern</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">files</td>
          <td class="context-item-value">&nbsp;[R]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">heckle_runner</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">line_number</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">loadby</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">output_stream</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">profile</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">reporter</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">reverse</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">timeout</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">user_input_for_runner</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">verbose</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Class methods</h3>

      <div id="method-M000530" class="method-detail">
        <a name="M000530"></a>

        <div class="method-heading">
          <a href="#M000530" class="method-signature">
          <span class="method-name">new</span><span class="method-args">(error_stream, output_stream)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000530-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000530-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 61</span>
61:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">error_stream</span>, <span class="ruby-identifier">output_stream</span>)
62:         <span class="ruby-ivar">@error_stream</span> = <span class="ruby-identifier">error_stream</span>
63:         <span class="ruby-ivar">@output_stream</span> = <span class="ruby-identifier">output_stream</span>
64:         <span class="ruby-ivar">@filename_pattern</span> = <span class="ruby-value str">&quot;**/*_spec.rb&quot;</span>
65:         <span class="ruby-ivar">@backtrace_tweaker</span> = <span class="ruby-constant">QuietBacktraceTweaker</span>.<span class="ruby-identifier">new</span>
66:         <span class="ruby-ivar">@examples</span> = []
67:         <span class="ruby-ivar">@colour</span> = <span class="ruby-keyword kw">false</span>
68:         <span class="ruby-ivar">@profile</span> = <span class="ruby-keyword kw">false</span>
69:         <span class="ruby-ivar">@dry_run</span> = <span class="ruby-keyword kw">false</span>
70:         <span class="ruby-ivar">@reporter</span> = <span class="ruby-constant">Reporter</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
71:         <span class="ruby-ivar">@context_lines</span> = <span class="ruby-value">3</span>
72:         <span class="ruby-ivar">@diff_format</span>  = <span class="ruby-identifier">:unified</span>
73:         <span class="ruby-ivar">@files</span> = []
74:         <span class="ruby-ivar">@example_groups</span> = []
75:         <span class="ruby-ivar">@result</span> = <span class="ruby-keyword kw">nil</span>
76:         <span class="ruby-ivar">@examples_run</span> = <span class="ruby-keyword kw">false</span>
77:         <span class="ruby-ivar">@examples_should_be_run</span> = <span class="ruby-keyword kw">nil</span>
78:         <span class="ruby-ivar">@user_input_for_runner</span> = <span class="ruby-keyword kw">nil</span>
79:         <span class="ruby-ivar">@before_suite_parts</span> = []
80:         <span class="ruby-ivar">@after_suite_parts</span> = []
81:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000531" class="method-detail">
        <a name="M000531"></a>

        <div class="method-heading">
          <a href="#M000531" class="method-signature">
          <span class="method-name">add_example_group</span><span class="method-args">(example_group)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000531-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000531-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 83</span>
83:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">add_example_group</span>(<span class="ruby-identifier">example_group</span>)
84:         <span class="ruby-ivar">@example_groups</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">example_group</span>
85:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000536" class="method-detail">
        <a name="M000536"></a>

        <div class="method-heading">
          <a href="#M000536" class="method-signature">
          <span class="method-name">colour=</span><span class="method-args">(colour)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000536-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000536-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 135</span>
135:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">colour=</span>(<span class="ruby-identifier">colour</span>)
136:         <span class="ruby-ivar">@colour</span> = <span class="ruby-identifier">colour</span>
137:         <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@colour</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-constant">RUBY_PLATFORM</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/mswin|mingw/</span> ;\
138:           <span class="ruby-keyword kw">begin</span> ;\
139:             <span class="ruby-identifier">replace_output</span> = <span class="ruby-ivar">@output_stream</span>.<span class="ruby-identifier">equal?</span>(<span class="ruby-identifier">$stdout</span>) ;\
140:             <span class="ruby-identifier">require</span> <span class="ruby-value str">'rubygems'</span> ;\
141:             <span class="ruby-identifier">require</span> <span class="ruby-value str">'Win32/Console/ANSI'</span> ;\
142:             <span class="ruby-ivar">@output_stream</span> = <span class="ruby-identifier">$stdout</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">replace_output</span> ;\
143:           <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">LoadError</span> ;\
144:             <span class="ruby-identifier">warn</span> <span class="ruby-value str">&quot;You must 'gem install win32console' to use colour on Windows&quot;</span> ;\
145:             <span class="ruby-ivar">@colour</span> = <span class="ruby-keyword kw">false</span> ;\
146:           <span class="ruby-keyword kw">end</span>
147:         <span class="ruby-keyword kw">end</span>
148:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000534" class="method-detail">
        <a name="M000534"></a>

        <div class="method-heading">
          <a href="#M000534" class="method-signature">
          <span class="method-name">examples_run?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000534-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000534-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 127</span>
127:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">examples_run?</span>
128:         <span class="ruby-ivar">@examples_run</span>
129:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000535" class="method-detail">
        <a name="M000535"></a>

        <div class="method-heading">
          <a href="#M000535" class="method-signature">
          <span class="method-name">examples_should_not_be_run</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000535-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000535-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 131</span>
131:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">examples_should_not_be_run</span>
132:         <span class="ruby-ivar">@examples_should_be_run</span> = <span class="ruby-keyword kw">false</span>
133:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000545" class="method-detail">
        <a name="M000545"></a>

        <div class="method-heading">
          <a href="#M000545" class="method-signature">
          <span class="method-name">files_to_load</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000545-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000545-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 219</span>
219:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">files_to_load</span>
220:         <span class="ruby-identifier">result</span> = []
221:         <span class="ruby-identifier">sorted_files</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">file</span><span class="ruby-operator">|</span>
222:           <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">file</span>)
223:             <span class="ruby-identifier">filename_pattern</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;,&quot;</span>).<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">pattern</span><span class="ruby-operator">|</span>
224:               <span class="ruby-identifier">result</span> <span class="ruby-operator">+=</span> <span class="ruby-constant">Dir</span>[<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-node">&quot;#{file}/#{pattern.strip}&quot;</span>)]
225:             <span class="ruby-keyword kw">end</span>
226:           <span class="ruby-keyword kw">elsif</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">file</span>)
227:             <span class="ruby-identifier">result</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-identifier">file</span>
228:           <span class="ruby-keyword kw">else</span>
229:             <span class="ruby-identifier">raise</span> <span class="ruby-node">&quot;File or directory not found: #{file}&quot;</span>
230:           <span class="ruby-keyword kw">end</span>
231:         <span class="ruby-keyword kw">end</span>
232:         <span class="ruby-identifier">result</span>
233:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000540" class="method-detail">
        <a name="M000540"></a>

        <div class="method-heading">
          <a href="#M000540" class="method-signature">
          <span class="method-name">formatters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000540-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000540-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 183</span>
183:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">formatters</span>
184:         <span class="ruby-ivar">@format_options</span> <span class="ruby-operator">||=</span> [[<span class="ruby-value str">'progress'</span>, <span class="ruby-ivar">@output_stream</span>]]
185:         <span class="ruby-ivar">@formatters</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">load_formatters</span>(<span class="ruby-ivar">@format_options</span>, <span class="ruby-constant">EXAMPLE_FORMATTERS</span>)
186:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000542" class="method-detail">
        <a name="M000542"></a>

        <div class="method-heading">
          <a href="#M000542" class="method-signature">
          <span class="method-name">load_formatters</span><span class="method-args">(format_options, formatters)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000542-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000542-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 193</span>
193:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_formatters</span>(<span class="ruby-identifier">format_options</span>, <span class="ruby-identifier">formatters</span>)
194:         <span class="ruby-identifier">format_options</span>.<span class="ruby-identifier">map</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">format</span>, <span class="ruby-identifier">where</span><span class="ruby-operator">|</span>
195:           <span class="ruby-identifier">formatter_type</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">formatters</span>[<span class="ruby-identifier">format</span>]
196:             <span class="ruby-identifier">require</span> <span class="ruby-identifier">formatters</span>[<span class="ruby-identifier">format</span>][<span class="ruby-value">0</span>]
197:             <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">formatters</span>[<span class="ruby-identifier">format</span>][<span class="ruby-value">1</span>], <span class="ruby-identifier">binding</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>)
198:           <span class="ruby-keyword kw">else</span>
199:             <span class="ruby-identifier">load_class</span>(<span class="ruby-identifier">format</span>, <span class="ruby-value str">'formatter'</span>, <span class="ruby-value str">'--format'</span>)
200:           <span class="ruby-keyword kw">end</span>
201:           <span class="ruby-identifier">formatter_type</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">where</span>)
202:         <span class="ruby-keyword kw">end</span>
203:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000543" class="method-detail">
        <a name="M000543"></a>

        <div class="method-heading">
          <a href="#M000543" class="method-signature">
          <span class="method-name">load_heckle_runner</span><span class="method-args">(heckle)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000543-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000543-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 205</span>
205:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_heckle_runner</span>(<span class="ruby-identifier">heckle</span>)
206:         <span class="ruby-identifier">suffix</span> = [<span class="ruby-regexp re">/mswin/</span>, <span class="ruby-regexp re">/java/</span>].<span class="ruby-identifier">detect</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">p</span><span class="ruby-operator">|</span> <span class="ruby-identifier">p</span> <span class="ruby-operator">=~</span> <span class="ruby-constant">RUBY_PLATFORM</span>} <span class="ruby-operator">?</span> <span class="ruby-value str">'_unsupported'</span> <span class="ruby-operator">:</span> <span class="ruby-value str">''</span>
207:         <span class="ruby-identifier">require</span> <span class="ruby-node">&quot;spec/runner/heckle_runner#{suffix}&quot;</span>
208:         <span class="ruby-ivar">@heckle_runner</span> = <span class="ruby-constant">HeckleRunner</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">heckle</span>)
209:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000544" class="method-detail">
        <a name="M000544"></a>

        <div class="method-heading">
          <a href="#M000544" class="method-signature">
          <span class="method-name">number_of_examples</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000544-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000544-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 211</span>
211:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">number_of_examples</span>
212:         <span class="ruby-identifier">total</span> = <span class="ruby-value">0</span>
213:         <span class="ruby-ivar">@example_groups</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">example_group</span><span class="ruby-operator">|</span>
214:           <span class="ruby-identifier">total</span> <span class="ruby-operator">+=</span> <span class="ruby-identifier">example_group</span>.<span class="ruby-identifier">number_of_examples</span>
215:         <span class="ruby-keyword kw">end</span>
216:         <span class="ruby-identifier">total</span>
217:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000537" class="method-detail">
        <a name="M000537"></a>

        <div class="method-heading">
          <a href="#M000537" class="method-signature">
          <span class="method-name">parse_diff</span><span class="method-args">(format)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000537-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000537-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 150</span>
150:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_diff</span>(<span class="ruby-identifier">format</span>)
151:         <span class="ruby-keyword kw">case</span> <span class="ruby-identifier">format</span>
152:         <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:context</span>, <span class="ruby-value str">'context'</span>, <span class="ruby-value str">'c'</span>
153:           <span class="ruby-ivar">@diff_format</span>  = <span class="ruby-identifier">:context</span>
154:           <span class="ruby-identifier">default_differ</span>
155:         <span class="ruby-keyword kw">when</span> <span class="ruby-identifier">:unified</span>, <span class="ruby-value str">'unified'</span>, <span class="ruby-value str">'u'</span>, <span class="ruby-value str">''</span>, <span class="ruby-keyword kw">nil</span>
156:           <span class="ruby-ivar">@diff_format</span>  = <span class="ruby-identifier">:unified</span>
157:           <span class="ruby-identifier">default_differ</span>
158:         <span class="ruby-keyword kw">else</span>
159:           <span class="ruby-ivar">@diff_format</span>  = <span class="ruby-identifier">:custom</span>
160:           <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">differ_class</span> = <span class="ruby-identifier">load_class</span>(<span class="ruby-identifier">format</span>, <span class="ruby-value str">'differ'</span>, <span class="ruby-value str">'--diff'</span>)
161:         <span class="ruby-keyword kw">end</span>
162:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000538" class="method-detail">
        <a name="M000538"></a>

        <div class="method-heading">
          <a href="#M000538" class="method-signature">
          <span class="method-name">parse_example</span><span class="method-args">(example)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000538-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000538-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 164</span>
164:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_example</span>(<span class="ruby-identifier">example</span>)
165:         <span class="ruby-keyword kw">if</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">file?</span>(<span class="ruby-identifier">example</span>))
166:           <span class="ruby-ivar">@examples</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">example</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
167:         <span class="ruby-keyword kw">else</span>
168:           <span class="ruby-ivar">@examples</span> = [<span class="ruby-identifier">example</span>]
169:         <span class="ruby-keyword kw">end</span>
170:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000539" class="method-detail">
        <a name="M000539"></a>

        <div class="method-heading">
          <a href="#M000539" class="method-signature">
          <span class="method-name">parse_format</span><span class="method-args">(format_arg)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000539-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000539-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 172</span>
172:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">parse_format</span>(<span class="ruby-identifier">format_arg</span>)
173:         <span class="ruby-identifier">format</span>, <span class="ruby-identifier">where</span> = <span class="ruby-constant">ClassAndArgumentsParser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">format_arg</span>)
174:         <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">where</span>
175:           <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;When using several --format options only one of them can be without a file&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@out_used</span>
176:           <span class="ruby-identifier">where</span> = <span class="ruby-ivar">@output_stream</span>
177:           <span class="ruby-ivar">@out_used</span> = <span class="ruby-keyword kw">true</span>
178:         <span class="ruby-keyword kw">end</span>
179:         <span class="ruby-ivar">@format_options</span> <span class="ruby-operator">||=</span> []
180:         <span class="ruby-ivar">@format_options</span> <span class="ruby-operator">&lt;&lt;</span> [<span class="ruby-identifier">format</span>, <span class="ruby-identifier">where</span>]
181:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000532" class="method-detail">
        <a name="M000532"></a>

        <div class="method-heading">
          <a href="#M000532" class="method-signature">
          <span class="method-name">remove_example_group</span><span class="method-args">(example_group)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000532-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000532-source">
<pre>
    <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 87</span>
87:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">remove_example_group</span>(<span class="ruby-identifier">example_group</span>)
88:         <span class="ruby-ivar">@example_groups</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">example_group</span>)
89:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000533" class="method-detail">
        <a name="M000533"></a>

        <div class="method-heading">
          <a href="#M000533" class="method-signature">
          <span class="method-name">run_examples</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000533-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000533-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 91</span>
 91:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">run_examples</span>
 92:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">true</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">examples_should_be_run?</span>
 93:         <span class="ruby-identifier">success</span> = <span class="ruby-keyword kw">true</span>
 94:         <span class="ruby-keyword kw">begin</span>
 95:           <span class="ruby-identifier">runner</span> = <span class="ruby-identifier">custom_runner</span> <span class="ruby-operator">||</span> <span class="ruby-constant">ExampleGroupRunner</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
 96: 
 97:           <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@files_loaded</span>
 98:             <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">load_files</span>(<span class="ruby-identifier">files_to_load</span>)
 99:             <span class="ruby-ivar">@files_loaded</span> = <span class="ruby-keyword kw">true</span>
100:           <span class="ruby-keyword kw">end</span>
101: 
102:           <span class="ruby-comment cmt"># TODO - this has to happen after the files get loaded,</span>
103:           <span class="ruby-comment cmt"># otherwise the before_suite_parts are not populated</span>
104:           <span class="ruby-comment cmt"># from the configuration. There is no spec for this</span>
105:           <span class="ruby-comment cmt"># directly, but stories/configuration/before_blocks.story</span>
106:           <span class="ruby-comment cmt"># will fail if this happens before the files are loaded.</span>
107:           <span class="ruby-identifier">before_suite_parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
108:             <span class="ruby-identifier">part</span>.<span class="ruby-identifier">call</span>
109:           <span class="ruby-keyword kw">end</span>
110: 
111:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">example_groups</span>.<span class="ruby-identifier">empty?</span>
112:             <span class="ruby-keyword kw">true</span>
113:           <span class="ruby-keyword kw">else</span>
114:             <span class="ruby-identifier">set_spec_from_line_number</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">line_number</span>
115:             <span class="ruby-identifier">success</span> = <span class="ruby-identifier">runner</span>.<span class="ruby-identifier">run</span>
116:             <span class="ruby-ivar">@examples_run</span> = <span class="ruby-keyword kw">true</span>
117:             <span class="ruby-identifier">heckle</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">heckle_runner</span>
118:             <span class="ruby-identifier">success</span>
119:           <span class="ruby-keyword kw">end</span>
120:         <span class="ruby-keyword kw">ensure</span>
121:           <span class="ruby-identifier">after_suite_parts</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">part</span><span class="ruby-operator">|</span>
122:             <span class="ruby-identifier">part</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">success</span>)
123:           <span class="ruby-keyword kw">end</span>
124:         <span class="ruby-keyword kw">end</span>
125:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000541" class="method-detail">
        <a name="M000541"></a>

        <div class="method-heading">
          <a href="#M000541" class="method-signature">
          <span class="method-name">story_formatters</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000541-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000541-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 188</span>
188:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">story_formatters</span>
189:         <span class="ruby-ivar">@format_options</span> <span class="ruby-operator">||=</span> [[<span class="ruby-value str">'plain'</span>, <span class="ruby-ivar">@output_stream</span>]]
190:         <span class="ruby-ivar">@formatters</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">load_formatters</span>(<span class="ruby-ivar">@format_options</span>, <span class="ruby-constant">STORY_FORMATTERS</span>)
191:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <h3 class="section-bar">Protected Instance methods</h3>

      <div id="method-M000549" class="method-detail">
        <a name="M000549"></a>

        <div class="method-heading">
          <a href="#M000549" class="method-signature">
          <span class="method-name">custom_runner</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000549-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000549-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 265</span>
265:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">custom_runner</span>
266:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">custom_runner?</span>
267:         <span class="ruby-identifier">klass_name</span>, <span class="ruby-identifier">arg</span> = <span class="ruby-constant">ClassAndArgumentsParser</span>.<span class="ruby-identifier">parse</span>(<span class="ruby-identifier">user_input_for_runner</span>)
268:         <span class="ruby-identifier">runner_type</span> = <span class="ruby-identifier">load_class</span>(<span class="ruby-identifier">klass_name</span>, <span class="ruby-value str">'behaviour runner'</span>, <span class="ruby-value str">'--runner'</span>)
269:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">runner_type</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>, <span class="ruby-identifier">arg</span>)
270:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000550" class="method-detail">
        <a name="M000550"></a>

        <div class="method-heading">
          <a href="#M000550" class="method-signature">
          <span class="method-name">custom_runner?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000550-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000550-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 272</span>
272:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">custom_runner?</span>
273:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">user_input_for_runner</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">true</span> <span class="ruby-operator">:</span> <span class="ruby-keyword kw">false</span>
274:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000554" class="method-detail">
        <a name="M000554"></a>

        <div class="method-heading">
          <a href="#M000554" class="method-signature">
          <span class="method-name">default_differ</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000554-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000554-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 290</span>
290:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">default_differ</span>
291:         <span class="ruby-identifier">require</span> <span class="ruby-value str">'spec/expectations/differs/default'</span>
292:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">differ_class</span> = <span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Expectations</span><span class="ruby-operator">::</span><span class="ruby-constant">Differs</span><span class="ruby-operator">::</span><span class="ruby-constant">Default</span>
293:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000547" class="method-detail">
        <a name="M000547"></a>

        <div class="method-heading">
          <a href="#M000547" class="method-signature">
          <span class="method-name">differ_class=</span><span class="method-args">(klass)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000547-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000547-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 241</span>
241:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">differ_class=</span>(<span class="ruby-identifier">klass</span>)
242:         <span class="ruby-keyword kw">return</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">klass</span>
243:         <span class="ruby-ivar">@differ_class</span> = <span class="ruby-identifier">klass</span>
244:         <span class="ruby-constant">Spec</span><span class="ruby-operator">::</span><span class="ruby-constant">Expectations</span>.<span class="ruby-identifier">differ</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">differ_class</span>.<span class="ruby-identifier">new</span>(<span class="ruby-keyword kw">self</span>)
245:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000546" class="method-detail">
        <a name="M000546"></a>

        <div class="method-heading">
          <a href="#M000546" class="method-signature">
          <span class="method-name">examples_should_be_run?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000546-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000546-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 236</span>
236:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">examples_should_be_run?</span>
237:         <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@examples_should_be_run</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@examples_should_be_run</span>.<span class="ruby-identifier">nil?</span>
238:         <span class="ruby-ivar">@examples_should_be_run</span> = <span class="ruby-keyword kw">true</span>
239:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000551" class="method-detail">
        <a name="M000551"></a>

        <div class="method-heading">
          <a href="#M000551" class="method-signature">
          <span class="method-name">heckle</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000551-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000551-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 276</span>
276:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">heckle</span>
277:         <span class="ruby-identifier">heckle_runner</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">heckle_runner</span>
278:         <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">heckle_runner</span> = <span class="ruby-keyword kw">nil</span>
279:         <span class="ruby-identifier">heckle_runner</span>.<span class="ruby-identifier">heckle_with</span>
280:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000548" class="method-detail">
        <a name="M000548"></a>

        <div class="method-heading">
          <a href="#M000548" class="method-signature">
          <span class="method-name">load_class</span><span class="method-args">(name, kind, option)</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000548-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000548-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 247</span>
247:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">load_class</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">kind</span>, <span class="ruby-identifier">option</span>)
248:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">name</span> <span class="ruby-operator">=~</span> <span class="ruby-regexp re">/\A(?:::)?([A-Z]\w*(?:::[A-Z]\w*)*)\z/</span>
249:           <span class="ruby-identifier">arg</span> = <span class="ruby-identifier">$2</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;&quot;</span> <span class="ruby-operator">?</span> <span class="ruby-keyword kw">nil</span> <span class="ruby-operator">:</span> <span class="ruby-identifier">$2</span>
250:           [<span class="ruby-identifier">$1</span>, <span class="ruby-identifier">arg</span>]
251:         <span class="ruby-keyword kw">else</span>
252:           <span class="ruby-identifier">m</span> = <span class="ruby-node">&quot;#{name.inspect} is not a valid class name&quot;</span>
253:           <span class="ruby-ivar">@error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">m</span>
254:           <span class="ruby-identifier">raise</span> <span class="ruby-identifier">m</span>
255:         <span class="ruby-keyword kw">end</span>
256:         <span class="ruby-keyword kw">begin</span>
257:           <span class="ruby-identifier">eval</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">binding</span>, <span class="ruby-keyword kw">__FILE__</span>, <span class="ruby-keyword kw">__LINE__</span>)
258:         <span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">NameError</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
259:           <span class="ruby-ivar">@error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Couldn't find #{kind} class #{name}&quot;</span>
260:           <span class="ruby-ivar">@error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Make sure the --require option is specified *before* #{option}&quot;</span>
261:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$_</span><span class="ruby-identifier">spec_spec</span> ; <span class="ruby-identifier">raise</span> <span class="ruby-identifier">e</span> ; <span class="ruby-keyword kw">else</span> <span class="ruby-identifier">exit</span>(<span class="ruby-value">1</span>) ; <span class="ruby-keyword kw">end</span>
262:         <span class="ruby-keyword kw">end</span>
263:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000555" class="method-detail">
        <a name="M000555"></a>

        <div class="method-heading">
          <a href="#M000555" class="method-signature">
          <span class="method-name">set_spec_from_line_number</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000555-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000555-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 295</span>
295:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">set_spec_from_line_number</span>
296:         <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">examples</span>.<span class="ruby-identifier">empty?</span>
297:           <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">==</span> <span class="ruby-value">1</span>
298:             <span class="ruby-keyword kw">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">directory?</span>(<span class="ruby-identifier">files</span>[<span class="ruby-value">0</span>])
299:               <span class="ruby-identifier">error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;You must specify one file, not a directory when using the --line option&quot;</span>
300:               <span class="ruby-identifier">exit</span>(<span class="ruby-value">1</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stderr?</span>
301:             <span class="ruby-keyword kw">else</span>
302:               <span class="ruby-identifier">example</span> = <span class="ruby-constant">SpecParser</span>.<span class="ruby-identifier">new</span>.<span class="ruby-identifier">spec_name_for</span>(<span class="ruby-identifier">files</span>[<span class="ruby-value">0</span>], <span class="ruby-identifier">line_number</span>)
303:               <span class="ruby-ivar">@examples</span> = [<span class="ruby-identifier">example</span>]
304:             <span class="ruby-keyword kw">end</span>
305:           <span class="ruby-keyword kw">else</span>
306:             <span class="ruby-identifier">error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;Only one file can be specified when using the --line option: #{files.inspect}&quot;</span>
307:             <span class="ruby-identifier">exit</span>(<span class="ruby-value">3</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stderr?</span>
308:           <span class="ruby-keyword kw">end</span>
309:         <span class="ruby-keyword kw">else</span>
310:           <span class="ruby-identifier">error_stream</span>.<span class="ruby-identifier">puts</span> <span class="ruby-value str">&quot;You cannot use both --line and --example&quot;</span>
311:           <span class="ruby-identifier">exit</span>(<span class="ruby-value">4</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">stderr?</span>
312:         <span class="ruby-keyword kw">end</span>
313:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000552" class="method-detail">
        <a name="M000552"></a>

        <div class="method-heading">
          <a href="#M000552" class="method-signature">
          <span class="method-name">sorted_files</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000552-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000552-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 282</span>
282:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sorted_files</span>
283:         <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">sorter</span> <span class="ruby-operator">?</span> <span class="ruby-identifier">files</span>.<span class="ruby-identifier">sort</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">sorter</span>) <span class="ruby-operator">:</span> <span class="ruby-identifier">files</span>
284:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000553" class="method-detail">
        <a name="M000553"></a>

        <div class="method-heading">
          <a href="#M000553" class="method-signature">
          <span class="method-name">sorter</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000553-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000553-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 286</span>
286:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">sorter</span>
287:         <span class="ruby-constant">FILE_SORTERS</span>[<span class="ruby-identifier">loadby</span>]
288:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>

      <div id="method-M000556" class="method-detail">
        <a name="M000556"></a>

        <div class="method-heading">
          <a href="#M000556" class="method-signature">
          <span class="method-name">stderr?</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000556-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000556-source">
<pre>
     <span class="ruby-comment cmt"># File vendor/plugins/rspec/lib/spec/runner/options.rb, line 315</span>
315:       <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">stderr?</span>
316:         <span class="ruby-ivar">@error_stream</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">$stderr</span>
317:       <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>